ifneq ($(KERNELRELEASE),)
CFLAGS +=  -I$(PWD)/../include
#CFLAGS +=  -D__ENABLE_DEBUG__
#EXTRA_CFLAGS += -O0

	obj-m := kmsg_driver.o
else
        KERNELDIR ?= /lib/modules/$(shell uname -r)/build
        PWD := $(shell pwd)
default:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules -Wall
install:
	install kmsg_driver.ko /lib/modules/$(shell uname -r)/kernel/drivers/md
	depmod -a 
clean:
	rm -rf *.o *.ko *.mod.c Module.symvers .kmsg* .tmp* .exrc
endif
